<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib prefix="spring"  uri="http://www.springframework.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- /section:basics/sidebar -->
			<div class="main-content">
				<!-- #section:basics/content.breadcrumbs -->
				<div class="breadcrumbs" id="breadcrumbs">
					<script type="text/javascript">
						try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
					</script>

					<ul class="breadcrumb">
						<li>
							<i class="ace-icon fa fa-home home-icon"></i>
							<a href="#">管理试题信息</a>
						</li>
					</ul><!-- /.breadcrumb -->

					<!-- #section:basics/content.searchbox -->
					<div class="nav-search" id="nav-search">
						<form class="form-search">
							<span class="input-icon">
								<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
								<i class="ace-icon fa fa-search nav-search-icon"></i>
							</span>
						</form>
					</div><!-- /.nav-search -->

					<!-- /section:basics/content.searchbox -->
				</div>

				<!-- /section:basics/content.breadcrumbs -->
				<div class="page-content">
					<!-- #section:settings.box -->
					<div class="ace-settings-container" id="ace-settings-container">
						<div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
							<i class="ace-icon fa fa-cog bigger-150"></i>
						</div>

						<div class="ace-settings-box clearfix" id="ace-settings-box">
							<div class="pull-left width-50">
								<!-- #section:settings.skins -->
								<div class="ace-settings-item">
									<div class="pull-left">
										<select id="skin-colorpicker" class="hide">
											<option data-skin="no-skin" value="#438EB9">#438EB9</option>
											<option data-skin="skin-1" value="#222A2D">#222A2D</option>
											<option data-skin="skin-2" value="#C6487E">#C6487E</option>
											<option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
										</select>
									</div>
									<span>&nbsp; Choose Skin</span>
								</div>

								<!-- /section:settings.skins -->

								<!-- #section:settings.navbar -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar" />
									<label class="lbl" for="ace-settings-navbar"> Fixed Navbar</label>
								</div>

								<!-- /section:settings.navbar -->

								<!-- #section:settings.sidebar -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar" />
									<label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
								</div>

								<!-- /section:settings.sidebar -->

								<!-- #section:settings.breadcrumbs -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs" />
									<label class="lbl" for="ace-settings-breadcrumbs"> Fixed Breadcrumbs</label>
								</div>

								<!-- /section:settings.breadcrumbs -->

								<!-- #section:settings.rtl -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl" />
									<label class="lbl" for="ace-settings-rtl"> Right To Left (rtl)</label>
								</div>

								<!-- /section:settings.rtl -->

								<!-- #section:settings.container -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container" />
									<label class="lbl" for="ace-settings-add-container">
										Inside
										<b>.container</b>
									</label>
								</div>

								<!-- /section:settings.container -->
							</div><!-- /.pull-left -->

							<div class="pull-left width-50">
								<!-- #section:basics/sidebar.options -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-hover" />
									<label class="lbl" for="ace-settings-hover"> Submenu on Hover</label>
								</div>

								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-compact" />
									<label class="lbl" for="ace-settings-compact"> Compact Sidebar</label>
								</div>

								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-highlight" />
									<label class="lbl" for="ace-settings-highlight"> Alt. Active Item</label>
								</div>

								<!-- /section:basics/sidebar.options -->
							</div><!-- /.pull-left -->
						</div><!-- /.ace-settings-box -->
					</div><!-- /.ace-settings-container -->

					<!-- /section:settings.box -->
					<div class="page-content-area">
					
						<!-- 添加考题的按钮 -->
						<button type="button" id="add" class="btn btn-info" data-toggle="modal" data-target="#addTestlModal"><i class="ace-icon fa fa-plus bigger-120"></i>添加试题</button>
						
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="row">
									<div class="col-xs-12">
										<table id="sample-table-1" class="table table-striped table-bordered table-hover">
											<thead>
												<tr>
													<th>题号</th>
													<th>科目</th>
													<th>提干</th>
													<th>选项A</th>
													<th>选项B</th>
													<th>选项C</th>
													<th>选项D</th>
													<th>答案</th>
													<th>题目类型</th>
													<th>题目分数</th>
													<th>
														<i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>操作
													</th>
												</tr>
											</thead>
											<tbody>
												<c:forEach items="${testList.dates }" var="test">
													<tr>
														<td>${test.id }</td>
														<td>${test.subName }</td>
														<td><div style="width: 100px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow: hidden;">${test.content }</div></td>
														<td><div style="width: 100px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow: hidden;">${test.chooseA }</div></td>
														<td><div style="width: 100px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow: hidden;">${test.chooseB }</div></td>
														<td><div style="width: 100px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow: hidden;">${test.chooseC }</div></td>
														<td><div style="width: 100px;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow: hidden;">${test.chooseD }</div></td>
														<td>${test.answer }</td>
														<td>${test.testType }</td>
														<td>${test.testTypeScore }分</td>
														<td>
															<a title="查看试题" class="btn btn-primary btn-xs show-test"><i class="ace-icon fa fa-comment"></i></a>
															<a title="修改试题" class="btn btn-primary btn-xs edit-test"><i class="ace-icon fa fa-pencil"></i></a>
															<a title="删除试题" class="btn btn-danger btn-xs delete-test" href="javascript:if(confirm('确实要删除吗?'))location='testDelete/${test.id }'"><i class="ace-icon fa fa-trash-o"></i></a>
																
														</td>
													</tr>
												</c:forEach>
												<tr>
													<td colspan="11" align="center">
														<jsp:include page="/WEB-INF/view/page/page.jsp">
															<jsp:param name="url" value="examTest"/>   
															<jsp:param name="items" value="${testList.totalSize}"/>
															<jsp:param name="pageSize" value="${testList.pageSize }"/>
														</jsp:include> 
													</td>
												</tr>
											</tbody>
										</table>
									</div><!-- /.span -->
								</div><!-- /.row -->
							</div><!-- /.col -->
						</div><!-- /.row -->
						
					</div><!-- /.page-content-area -->
				</div><!-- /.page-content -->
			</div><!-- /.main-content -->
			
			<!-- 添加模态框（Modal） -->
			<div class="modal fade" id="addTestlModal" tabindex="-1" role="dialog" aria-labelledby="addTestModalLabel" aria-hidden="true">
			    <div class="modal-dialog">
			        <div class="modal-content">
			            <div class="modal-header">
			                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			                <h4 class="modal-title" id="addTestModalLabel">添加考题</h4>
			            </div>
			            
			            <div class="modal-body">
			            <form action="" id="addFormTest">
			            	<p><label>科目:</label><select id="subId"><c:forEach items="${subList }" var="sub"><option value="${sub.subId }">${sub.subName }</option></c:forEach></select></p>
			            	<p><label>试题类型:</label><select id="testType"><c:forEach items="${typeList }" var="test"><option value="${test.id }">${test.testType }</option></c:forEach></select>&nbsp;&nbsp;&nbsp;&nbsp;<label class="testTypeScore"></label></p>
			            	<p><label>提干:</label><textarea rows="8" cols="50" placeholder="填写题目内容" id="content" ></textarea></p>
			            	<p><label>选项A:</label><input type="text" id="chooseA" placeholder="填写候选答案内容，作为答案A" size="50"/></p>
			            	<p><label>选项B:</label><input type="text" id="chooseB" placeholder="填写候选答案内容，作为答案B" size="50"/></p>
			            	<p><label>选项C:</label><input type="text" id="chooseC" placeholder="填写候选答案内容，作为答案C" size="50"/></p>
			            	<p><label>选项D:</label><input type="text" id="chooseD" placeholder="填写候选答案内容，作为答案D" size="50"/></p>
			            	<p><label>答案:</label>
			            		<span class="anwer">
			            			<input type="radio" name="anwer" value="A" />
			            			<input type="checkbox" name="anwer1" value="A"/>选项A
			            			<input type="radio" name="anwer" value="B"/>
			            			<input type="checkbox" name="anwer1" value="B"/>选项B
			            			<input type="radio" name="anwer" value="C"/>
			            			<input type="checkbox" name="anwer1" value="C"/>选项C
			            			<input type="radio" name="anwer" value="D"/>
			            			<input type="checkbox" name="anwer1" value="D"/>选项D
			            		</span>
			            	</p>
			            	 </form>
			            </div>
			            <div class="modal-footer">
			                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			                <button type="button" class="btn btn-primary" id="addBtnTest">提交保存</button>
			            </div>
			           
			        </div><!-- /.modal-content -->
			    </div><!-- /.modal -->
			</div>
			<!-- 查看试题模态框（Modal） -->
			<div class="modal fade" id="showTestModal" tabindex="-1" role="dialog" aria-labelledby="showTestModal" aria-hidden="true">
			    <div class="modal-dialog">
			        <div class="modal-content">
			            <div class="modal-header">
			                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			                <h4 class="modal-title" id="showTestModal">查看详细考题</h4>
			            </div>
			            <div class="modal-body">
			            	<label>试题科目:&nbsp;&nbsp;</label><span class="sub-name"></span><br/>
			            	<label>题目:&nbsp;&nbsp;</label><span class="content"></span>&nbsp;&nbsp;——&nbsp;&nbsp;（<span class="test-type"></span>&nbsp;&nbsp;，每题<span class="test-type-score"></span>分）<br/>
			            	<label>A:&nbsp;&nbsp;</label><span class="choose-a"></span><br/>
			            	<label>B:&nbsp;&nbsp;</label><span class="choose-b"></span><br/>
			            	<label>C:&nbsp;&nbsp;</label><span class="choose-c"></span><br/>
			            	<label>D:&nbsp;&nbsp;</label><span class="choose-d"></span><br/>
			            	<label style="font-weight: bold;">答案:&nbsp;&nbsp;</label><span class="answer" style="font-weight: bold;"></span><br/>
			            </div>
			            <div class="modal-footer">
			                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			            </div>
			        </div><!-- /.modal-content -->
			    </div><!-- /.modal -->
			</div>
			<!-- 修改试题模态框（Modal） -->
				<div class="modal fade" id="editTestModal" tabindex="-1" role="dialog" aria-labelledby="editTestModal" aria-hidden="true">
						    <div class="modal-dialog">
						        <div class="modal-content">
						            <div class="modal-header">
						                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						                <h4 class="modal-title" id="editTestModal">修改考题</h4>
						            </div>
						            <div class="modal-body">
						            <form action="" id="editFormTest">
						            	<p><label>科目:</label><select name="subId" class="subId"><c:forEach items="${subList }" var="sub"><option value="${sub.subId }">${sub.subName }</option></c:forEach></select></p>
						            	<p><label>试题类型:</label><select class="testType"><c:forEach items="${typeList }" var="test"><option value="${test.id }">${test.testType }</option></c:forEach></select></select><label class="editTestTypeScore"></label></p>
						            	<p><label>提干:</label><textarea rows="8" cols="50" placeholder="填写题目内容" class="content"></textarea></p>
						            	<p><label class="chooseA">选项A:</label><input type="text" name="chooseA" placeholder="填写候选答案内容，作为答案A" size="50"/></p>
						            	<p><label class="chooseB">选项B:</label><input type="text" name="chooseB" placeholder="填写候选答案内容，作为答案B" size="50"/></p>
						            	<p><label class="chooseC">选项C:</label><input type="text" name="chooseC" placeholder="填写候选答案内容，作为答案C" size="50"/></p>
						            	<p><label class="chooseD">选项D:</label><input type="text" name="chooseD" placeholder="填写候选答案内容，作为答案D" size="50"/></p>
						            	<p><label>答案:</label>
						            		<span class="anwer">
						            			<input type="radio" name="editRadio" value="A" />
						            			<input type="checkbox" name="editCheckbox" value="A"/>选项A
						            			<input type="radio" name="editRadio" value="B"/>
						            			<input type="checkbox" name="editCheckbox" value="B"/>选项B
						            			<input type="radio" name="editRadio" value="C"/>
						            			<input type="checkbox" name="editCheckbox" value="C"/>选项C
						            			<input type="radio" name="editRadio" value="D"/>
						            			<input type="checkbox" name="editCheckbox" value="D"/>选项D
			            					</span>
						            	</p>
						            	</form>
						            </div>
						            <div class="modal-footer">
						                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						                <button type="button" class="btn btn-primary editTestType">提交保存</button>
						            </div>
						        </div><!-- /.modal-content -->
						    </div><!-- /.modal -->
						</div>
</body>
</html>

